class MyArray{
    Object[] array = new Object[10];

    public void set(int pos,Object val){
        this.array[pos] = val;
    }
    public Object get(int pos){
        return this.array[pos];
    }
}
public class demo1 {
    public static void main(String[] args) {
        MyArray myArray = new MyArray();
        myArray.set(0,10000);
        myArray.set(1,"hello");
        String ret = (String) myArray.get(1);//编译报错

    }
}
